package com.chrray.position.enums.app;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 求职类型: 1-短期,2-长期,3-都可以
 */
public enum FdJobTermEnum implements BaseEnum{
    SHORT_TERM(1, "短期"),
    LONG_TERM(2, "长期"),
    BOTH(3, "都可以")

    ;

    @JsonValue
    @EnumValue
    private final Integer value;
    private final String info;

    FdJobTermEnum(Integer value, String info) {
        this.info = info;
        this.value = value;
    }

    @JsonCreator
    public static FdJobTermEnum getByValue(Integer value) {
        for (FdJobTermEnum en : FdJobTermEnum.values()) {
            if (en.getValue().equals(value)) {
                return en;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public String getInfo() {
        return info;
    }
}
